package com.horse.pack.common.exception;

import com.horse.pack.common.enums.ServerCode;
import lombok.Data;

/**
 * @author yangliu
 * @date 2024/3/22 12:10 PM
 */
public class WarningException extends CommonException {

    public WarningException(ServerCode serverCodeEnum, Object... args) {
        this(serverCodeEnum.getCode(), serverCodeEnum.getMsg(), args);
    }

    public WarningException(Integer code, String message, Object... args) {
        super(code, message);
        this.args = args;
    }

    public static WarningException code(ServerCode serverCodeEnum, Object... args) {
        return new WarningException(serverCodeEnum, args);
    }

    public static WarningException code(Integer code,String message, Object... args) {
        return new WarningException(code,message, args);
    }



}
